using System.Collections.Generic;

namespace IssueIT.Core.Configuration.Settings
{
	public interface ISettings
	{
		IEnumerable<ConversionIssue> Issues { get; }

		bool HasIssues { get; }

		void AddIssue(ConversionIssue problem);
	}

	public abstract class SettingsBase : ISettings
	{
		private readonly IList<ConversionIssue> _issues = new List<ConversionIssue>();

		IEnumerable<ConversionIssue> ISettings.Issues
		{
			get
			{
				return _issues;
			}
		}

		bool ISettings.HasIssues
		{
			get
			{
				return _issues.Count>0;
			}
		}

		void ISettings.AddIssue(ConversionIssue problem)
		{
			_issues.Add(problem);
		}
	}
}